<?php 
if(!defined('ADMIN')){
	exit('Access Denied');
}

?>
<div class="pageHeader">
	<p><b>内容发布 > <?=$catename?></b></p>
</div>
<div class="pageContent" >
<form method="post" action="index.php?mod=content&act=addedipage" class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone)">
<input type="hidden" name="sub" value="save" />
<input type="hidden" name="catid" value="<?=$catid?>" />
<input type="hidden" name="id" value="<?=$id?>" />
<input type="hidden" name="stid" id="stid" value="1" />
<div class="pageFormContent nowrap" layoutH="80" style="overFlow-x: hidden;">
<?php foreach ($row as $r){
    $field=$r["field"];
    $val="";
        if($r["formtype"]=="category"){
           $val=get_relatecat($infodata[$field]);

         }elseif($r["formtype"]=="linkspecial"){
            $val=get_linkspecial($infodata[$field]);
         }elseif($r["formtype"]=="linkcat"){
            
             $val=get_linkcat($infodata[$field]);
          }elseif($r["formtype"]=="password"){
             
             $infodata[$field]="";
         }elseif($r["formtype"]=="editor"){
            if(empty($infodata[$field])){
                
                $infodata[$field]=$r["forminfo"];
            }
        }elseif($r["formtype"]=="attribute"){
            
            if(empty($infodata[$field])){
                
                $infodata[$field]=$r["forminfo"];
            }       
            
        }elseif($r["formtype"]=="editor1"){
            
            if(empty($infodata[$field])){
                
                $infodata[$field]=$r["forminfo"];
            }       
        }
          


            
    echo ez_display_form($r,$infodata[$field],$val);    
}
?>


</div>
<div class="formBar">
<ul style="float:left;">
<?
if($catid=="75" or $catid=="76"  or $catid=="79"){
?>
<li><div class="buttonActive"><div class="buttonContent"><button type="submit">发 布 内 容</button></div></div></li>
<?    
}else{
?>
<li><div class="buttonActive"><div class="buttonContent"><button type="submit">发 布 内 容</button></div></div></li>
<?
}
?>
<li><div class="buttonActive"><div class="buttonContent"><button type="submit" onclick="javascript:$('#stid').val(0);">保 存 为 草 稿</button></div></div></li>
</ul>
</div>
</form>
<script type="text/javascript">
function clearimginfo(divid){
    $("#"+divid+"title").val("");
    $("#"+divid+"id").val("");
    $("#"+divid+"fileName").val("");
    
}
</script>
</div>